package op;

import java.util.Scanner;

public class Test6 {

	public static void main(String[] args) {
		/*
		//翻转数字
		int n=12345678;   //  4321
		
		while(n!=0) {
			System.out.print(n%10);
			n=n/10;
		}
		
		
		// 1,1,2,3,5,8,13,21.... 打印20个
		int a=1,b=1,c;
		System.out.print("1,1,");
		for(int i=0;i<18;i++) {
			c=a+b;
			System.out.print(c+",");
			a=b;
			b=c;
		} 
		
		
		//水仙花
		int a,b,c;
		for(int i=100;i<1000;i++) {
			a=i%10;
			b=i/10%10;
			c=i/100;
			if (a*a*a+b*b*b+c*c*c==i) {
				System.out.println(i);
			}
		} 
		
		// 求 1.。100 的和  5050
		int he=0;
		for(int i=1;i<=100;i++) {
			he=he+i;
		}
		System.out.println(he);
		
		
		
		// 球下落
		double n=100;  //起始点   100m
		double he=0;
		for (int i = 0; i <10; i++) {
			he=he+n+n/2;
			n=n/2;
		}
		
		he=he-n;
		System.out.println("第10次上升"+n);
		System.out.println("第10次下落经过"+he);
		*/
		
		int year=2009;
		int month=1;
		int day=8;
		int he=0;  //和
		
		switch (month) {
		case 1:
			he=day;
			break;
		case 2:
			he=31+day;
			break;
		case 3:
			he=31+28+day;
			break;
		case 4:
			he=31+28+31+day;
			break;
			
			//......

		default:
			break;
		}
		
		if (month>2) {
			if(year%4==0&&year%100!=0||year%400==0) {
				he++;
			}
		}
		
		System.out.println("是这一年的第"+he+"天");
		
	}

}
